*TABLE A3
*PANEL A
*Childcare
use synth3_615.dta, clear
*Average Flå is mean _Y_treated, average synthetic control is mean _Y_synthetic
su _Y_treated _Y_synthetic if _time>1995 
*Difference is _Y_treated -_Y_synthetic
*p-value is from Model 3 in Table A2 (see tablea2.do)

*Education
use synthed9_615.dta, clear
*Average Flå is mean _Y_treated, average synthetic control is mean _Y_synthetic
su _Y_treated _Y_synthetic if _time>1995 
*Difference is _Y_treated -_Y_synthetic
*p-value is from Model 9 in Table A2 (see tablea2.do)

*Elderlycare
use synthel9_615.dta, clear
*Average Flå is mean _Y_treated, average synthetic control is mean _Y_synthetic
su _Y_treated _Y_synthetic if _time>1995 
*Difference is _Y_treated -_Y_synthetic
*p-value is from Model 9 in Table A2 (see tablea2.do)

*Health care
use synthhe3_615.dta, clear
*Average Flå is mean _Y_treated, average synthetic control is mean _Y_synthetic
su _Y_treated _Y_synthetic if _time>1995 
*Difference is _Y_treated -_Y_synthetic
*p-value is from Model 3 in Table A2 (see tablea2.do)


*PANEL B
*Childcare
use synth1_615.dta, clear
foreach t of numlist 2 3 4 9 10{
append using synth`t'_615.dta
}
collapse (mean) _Y_treated _Y_synthetic, by(_time)
*Average Flå is mean _Y_treated, average synthetic control is mean _Y_synthetic
su _Y_treated _Y_synthetic if _time>1995  
*Difference is _Y_treated -_Y_synthetic
*p-value: mean of p_Fla
clear
use "childcare_avg_p_long.dta"
collapse (mean) RMSPE, by(komnr)
gen RMSPE_Fla  = r(mean)
egen rank_RMSPE  = rank(-RMSPE) 
gen rank_RMSPE_Fla =rank_RMSPE  if komnr==615  
gen p_Fla  = rank_RMSPE_Fla /164
su p_Fla 

*Education
use synthed1_615.dta, clear
foreach t of numlist 2 3  5 6 7 8  9 10{
append using synthed`t'_615.dta
}
collapse (mean) _Y_treated _Y_synthetic, by(_time)
*Average Flå is mean _Y_treated, average synthetic control is mean _Y_synthetic
su _Y_treated _Y_synthetic if _time>1995  
*Difference is _Y_treated -_Y_synthetic
*p-value: mean of p_Fla
clear
use "education_avg_p_long.dta"
collapse (mean) RMSPE, by(komnr)
gen RMSPE_Fla  = r(mean)
egen rank_RMSPE  = rank(-RMSPE) 
gen rank_RMSPE_Fla =rank_RMSPE  if komnr==615  
gen p_Fla  = rank_RMSPE_Fla /164
su p_Fla 


*Elderlycare
use synthel1_615.dta, clear
foreach t of numlist 2 7 8 9 10{
append using synthel`t'_615.dta
}
collapse (mean) _Y_treated _Y_synthetic, by(_time)
*Average Flå is mean _Y_treated, average synthetic control is mean _Y_synthetic
su _Y_treated _Y_synthetic if _time>1995  
*Difference is _Y_treated -_Y_synthetic
*p-value: mean of p_Fla
clear
use "elderly_avg_p_long.dta"
collapse (mean) RMSPE, by(komnr)
gen RMSPE_Fla  = r(mean)
egen rank_RMSPE  = rank(-RMSPE) 
gen rank_RMSPE_Fla =rank_RMSPE  if komnr==615  
gen p_Fla  = rank_RMSPE_Fla /164
su p_Fla 


*Health care
use synthhe1_615.dta, clear
foreach t of numlist 2 3  5 6 7 8  9 10{
append using synthhe`t'_615.dta
}
collapse (mean) _Y_treated _Y_synthetic, by(_time)
*Average Flå is mean _Y_treated, average synthetic control is mean _Y_synthetic
su _Y_treated _Y_synthetic if _time>1995  
*Difference is _Y_treated -_Y_synthetic
*p-value: mean of p_Fla
clear
use "health_avg_p_long.dta"
collapse (mean) RMSPE, by(komnr)
gen RMSPE_Fla  = r(mean)
egen rank_RMSPE  = rank(-RMSPE) 
gen rank_RMSPE_Fla =rank_RMSPE  if komnr==615  
gen p_Fla  = rank_RMSPE_Fla /164
su p_Fla 
